package cn.zyq.ykb.beans.course;

import cn.zyq.ykb.system.common.BaseBean;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 商学院课程对象 course
 *
 * @author SystemAuth
 * @date 2023-05-19
 */
@Data
@Entity
@Table(name = "`course`")
@JsonInclude(value = JsonInclude.Include.NON_NULL)
public class Course  extends BaseBean implements Serializable {
    /**
     * 主键id，用于关联
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY, generator = "JDBC")
    @Column(name = "`courseID`")
    @ApiModelProperty("主键id，用于关联")
    private Integer courseID;
    /**
     * 课程名称
     */
    @Column(name = "`courseName`")
    @ApiModelProperty("课程名称")
    private String courseName;
    /**
     * 图片
     */
    @Column(name = "`picture`")
    @ApiModelProperty("图片")
    private String picture;
    /**
     * 发布时间
     */
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "`cTime`")
    @ApiModelProperty("发布时间")
    private LocalDateTime cTime;
    /**
     * 内容
     */
    @Column(name = "`content`")
    @ApiModelProperty("内容")
    private String content;
    /**
     * 浏览人数
     */
    @Column(name = "`number`")
    @ApiModelProperty("浏览人数")
    private Integer number;
    /**
     * 类型（1新人必学，2进阶课程）
     */
    @Column(name = "`type`")
    @ApiModelProperty("类型（1新人必学，2进阶课程）")
    private Integer type;
    /**
     * 视频
     */
    @Column(name = "`video`")
    @ApiModelProperty("类型（1新人必学，2进阶课程）")
    private String video;
}
